<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>//为了将普通函数和生成函数
    function createMovie(movieName,type,rate,showTime){
        var movieObj={};
        movieObj.movieName =movieName;
        movieObj.type =type;
        movieObj.rate =rate;
        movieObj.showTime=showTime;
        movieObj.getNextShowing =function(){
            var current =11;   //showtime 传进来是个数组
            for(var i=0;i<movieObj.showTime.length;i++){
            if (current<parseInt(movieObj.showTime[i])) {
                console.log("下一次的播放时间"+movie.showTime[i]);
            }
        }
        }
        return movieObj;
    }
    var movie1 = createMovie("001","谍战类","9.0",["12.00","15.00","17.00"]);
    var movie2 = createMovie("指环王","冒险类","9.2",["13.00","16.00","18.00"]);
    console.log(movie1);
    console.log(movie2);
    </script>
</html>